home *** CD-ROM | disk | FTP | other *** search
/ PC Media 7 / PC MEDIA CD07.iso / share / prog / cm / cmqueue.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-06  |  1.1 KB  |  30 lines

  1. // CmQueue.h
  2. // -----------------------------------------------------------------
  3. // Compendium - C++ Container Class Library
  4. // Copyright (C) 1992-1994, Glenn M. Poorman, All rights reserved
  5. // -----------------------------------------------------------------
  6. // Queue definition.
  7. // -----------------------------------------------------------------
  8.  
  9. #ifndef _CMQUEUE_H
  10. #define _CMQUEUE_H
  11.  
  12. #include <cm/include/cmlist.h>
  13.  
  14. class CmQueue : public CmLinkedList {       // Queue class definition.
  15. public:
  16.   CmQueue();                                // Default queue constructor.
  17.   CmQueue(const CmQueue&);                  // Queue copy constructor.
  18.  ~CmQueue() {}                              // Queue destructor.
  19.  
  20.   CmQueue& operator=(const CmQueue&);       // Assignment operator.
  21.  
  22.   Bool      push(CmObject*);                // Push object into queue end.
  23.   CmObject* pop ();                         // Pop and return object from from.
  24.   CmObject* peek() const;                   // Return pointer to front object.
  25.  
  26.   CMOBJECT_DEFINE(CmQueue, CmLinkedList)    // Define object funcs.
  27. };
  28.  
  29. #endif
  30.